Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(X)) → S(n__add(sqr(activate(X)), dbl(activate(X))))
SQR(s(X)) → DBL(activate(X))
ACTIVATE(n__terms(X)) → TERMS(X)
ACTIVATE(n__s(X)) → S(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(X)) → SQR(activate(X))
DBL(s(X)) → S(n__s(n__dbl(activate(X))))
DBL(s(X)) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → S(n__add(activate(X), Y))
ADD(s(X), Y) → ACTIVATE(X)
TERMS(N) → S(N)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(X)) → S(n__add(sqr(activate(X)), dbl(activate(X))))
SQR(s(X)) → DBL(activate(X))
ACTIVATE(n__terms(X)) → TERMS(X)
ACTIVATE(n__s(X)) → S(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(X)) → SQR(activate(X))
DBL(s(X)) → S(n__s(n__dbl(activate(X))))
DBL(s(X)) → ACTIVATE(X)
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → S(n__add(activate(X), Y))
ADD(s(X), Y) → ACTIVATE(X)
TERMS(N) → S(N)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 5 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
DBL(s(X)) → ACTIVATE(X)
TERMS(N) → SQR(N)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(X)) → DBL(activate(X))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(X)) → SQR(activate(X))
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SQR(s(X)) → SQR(activate(X)) at position [0] we obtained the following new rules:

SQR(s(x0)) → SQR(x0)
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__s(x0))) → SQR(s(x0))
SQR(s(n__terms(x0))) → SQR(terms(x0))
SQR(s(n__first(x0, x1))) → SQR(first(x0, x1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
QDP
              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(X)) → DBL(activate(X))
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__terms(x0))) → SQR(terms(x0))
SQR(s(n__s(x0))) → SQR(s(x0))
SQR(s(n__first(x0, x1))) → SQR(first(x0, x1))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SQR(s(X)) → DBL(activate(X)) at position [0] we obtained the following new rules:

SQR(s(n__first(x0, x1))) → DBL(first(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(x0)) → DBL(x0)
SQR(s(n__terms(x0))) → DBL(terms(x0))
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
QDP
                  ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__first(x0, x1))) → DBL(first(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__terms(x0))) → DBL(terms(x0))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
SQR(s(n__terms(x0))) → SQR(terms(x0))
SQR(s(n__first(x0, x1))) → SQR(first(x0, x1))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SQR(s(x0)) → SQR(x0)
SQR(s(x0)) → DBL(x0)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SQR(s(n__terms(x0))) → SQR(terms(x0)) at position [0] we obtained the following new rules:

SQR(s(n__terms(x0))) → SQR(cons(recip(sqr(x0)), n__terms(s(x0))))
SQR(s(n__terms(x0))) → SQR(n__terms(x0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
QDP
                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__terms(x0))) → SQR(n__terms(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__first(x0, x1))) → DBL(first(x0, x1))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__terms(x0))) → DBL(terms(x0))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
SQR(s(n__first(x0, x1))) → SQR(first(x0, x1))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SQR(s(n__terms(x0))) → SQR(cons(recip(sqr(x0)), n__terms(s(x0))))
ADD(s(X), Y) → ACTIVATE(X)
SQR(s(x0)) → DBL(x0)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
QDP
                          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__first(x0, x1))) → DBL(first(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__terms(x0))) → DBL(terms(x0))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
SQR(s(n__first(x0, x1))) → SQR(first(x0, x1))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SQR(s(x0)) → SQR(x0)
SQR(s(x0)) → DBL(x0)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SQR(s(n__first(x0, x1))) → SQR(first(x0, x1)) at position [0] we obtained the following new rules:

SQR(s(n__first(x0, x1))) → SQR(n__first(x0, x1))
SQR(s(n__first(s(x0), cons(x1, x2)))) → SQR(cons(x1, n__first(activate(x0), activate(x2))))
SQR(s(n__first(0, x0))) → SQR(nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
QDP
                              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
SQR(s(n__first(0, x0))) → SQR(nil)
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(n__first(x0, x1))) → SQR(n__first(x0, x1))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__first(s(x0), cons(x1, x2)))) → SQR(cons(x1, n__first(activate(x0), activate(x2))))
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__first(x0, x1))) → DBL(first(x0, x1))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__terms(x0))) → DBL(terms(x0))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → ACTIVATE(X)
SQR(s(x0)) → DBL(x0)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
QDP
                                  ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__first(x0, x1))) → DBL(first(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__terms(x0))) → DBL(terms(x0))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SQR(s(x0)) → SQR(x0)
SQR(s(x0)) → DBL(x0)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SQR(s(n__first(x0, x1))) → DBL(first(x0, x1)) at position [0] we obtained the following new rules:

SQR(s(n__first(s(x0), cons(x1, x2)))) → DBL(cons(x1, n__first(activate(x0), activate(x2))))
SQR(s(n__first(x0, x1))) → DBL(n__first(x0, x1))
SQR(s(n__first(0, x0))) → DBL(nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
QDP
                                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SQR(s(n__first(s(x0), cons(x1, x2)))) → DBL(cons(x1, n__first(activate(x0), activate(x2))))
ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__terms(X)) → TERMS(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__first(x0, x1))) → DBL(n__first(x0, x1))
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__terms(x0))) → DBL(terms(x0))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → ACTIVATE(X)
SQR(s(x0)) → DBL(x0)
SQR(s(n__first(0, x0))) → DBL(nil)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
QDP
                                          ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
SQR(s(n__terms(x0))) → DBL(terms(x0))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SQR(s(x0)) → SQR(x0)
SQR(s(x0)) → DBL(x0)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SQR(s(n__terms(x0))) → DBL(terms(x0)) at position [0] we obtained the following new rules:

SQR(s(n__terms(x0))) → DBL(n__terms(x0))
SQR(s(n__terms(x0))) → DBL(cons(recip(sqr(x0)), n__terms(s(x0))))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
QDP
                                              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SQR(s(n__terms(x0))) → DBL(n__terms(x0))
ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(n__terms(x0))) → DBL(cons(recip(sqr(x0)), n__terms(s(x0))))
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ADD(s(X), Y) → ACTIVATE(X)
SQR(s(x0)) → DBL(x0)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
QDP
                                                  ↳ NonMonReductionPairProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SQR(s(x0)) → SQR(x0)
SQR(s(x0)) → DBL(x0)
ADD(s(X), Y) → ACTIVATE(X)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
Using the following max-polynomial ordering, we can orient the general usable rules and all rules from P weakly and some rules from P strictly:
Polynomial interpretation [25,21]:

POL(0) = 0   
POL(ACTIVATE(x1)) = x1   
POL(ADD(x1, x2)) = x1 + x2   
POL(DBL(x1)) = x1   
POL(FIRST(x1, x2)) = 1 + x1 + x2   
POL(SQR(x1)) = x1   
POL(TERMS(x1)) = x1   
POL(activate(x1)) = x1   
POL(add(x1, x2)) = max(0, x1 + x2)   
POL(cons(x1, x2)) = x2   
POL(dbl(x1)) = x1   
POL(first(x1, x2)) = max(0, 1 + x1 + x2)   
POL(n__add(x1, x2)) = x1 + x2   
POL(n__dbl(x1)) = x1   
POL(n__first(x1, x2)) = 1 + x1 + x2   
POL(n__s(x1)) = x1   
POL(n__terms(x1)) = x1   
POL(nil) = 0   
POL(recip(x1)) = 0   
POL(s(x1)) = x1   
POL(sqr(x1)) = 0   
POL(terms(x1)) = x1   

The following pairs can be oriented strictly and are deleted.

FIRST(s(X), cons(Y, Z)) → ACTIVATE(X)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
The remaining pairs can at least be oriented weakly.

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
SQR(s(x0)) → DBL(x0)
ADD(s(X), Y) → ACTIVATE(X)
The following rules are usable:

add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
add(X1, X2) → n__add(X1, X2)
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
dbl(X) → n__dbl(X)
s(X) → n__s(X)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
first(X1, X2) → n__first(X1, X2)
terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
terms(X) → n__terms(X)


↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ NonMonReductionPairProof
QDP
                                                      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__first(X1, X2)) → FIRST(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
ADD(s(X), Y) → ACTIVATE(X)
SQR(s(x0)) → DBL(x0)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ NonMonReductionPairProof
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
QDP
                                                          ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__dbl(X)) → DBL(X)
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__s(x0))) → DBL(s(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → SQR(x0)
ADD(s(X), Y) → ACTIVATE(X)
SQR(s(x0)) → DBL(x0)

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


ACTIVATE(n__dbl(X)) → DBL(X)
SQR(s(X)) → ACTIVATE(X)
SQR(s(n__dbl(x0))) → SQR(dbl(x0))
SQR(s(n__add(x0, x1))) → SQR(add(x0, x1))
DBL(s(X)) → ACTIVATE(X)
SQR(s(n__s(x0))) → SQR(s(x0))
SQR(s(x0)) → SQR(x0)
ADD(s(X), Y) → ACTIVATE(X)
The remaining pairs can at least be oriented weakly.

TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))
SQR(s(n__s(x0))) → DBL(s(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
SQR(s(x0)) → DBL(x0)
Used ordering: Combined order from the following AFS and order.
ACTIVATE(x1)  =  x1
n__dbl(x1)  =  n__dbl(x1)
DBL(x1)  =  DBL(x1)
TERMS(x1)  =  x1
SQR(x1)  =  x1
s(x1)  =  s(x1)
dbl(x1)  =  dbl(x1)
n__terms(x1)  =  x1
n__add(x1, x2)  =  n__add(x1, x2)
add(x1, x2)  =  add(x1, x2)
n__s(x1)  =  n__s(x1)
ADD(x1, x2)  =  ADD(x1, x2)
activate(x1)  =  activate(x1)
n__first(x1, x2)  =  n__first(x1)
first(x1, x2)  =  first(x1)
terms(x1)  =  terms(x1)
sqr(x1)  =  sqr(x1)
0  =  0
cons(x1, x2)  =  cons
recip(x1)  =  recip(x1)
nil  =  nil

Recursive path order with status [2].
Quasi-Precedence:
[ndbl1, dbl1, sqr1] > [nadd2, add2, ADD2] > [DBL1, s1, ns1] > [activate1, terms1, cons] > first1 > nfirst1
[ndbl1, dbl1, sqr1] > 0 > nil > nfirst1
recip1 > nfirst1

Status:
DBL1: multiset
ndbl1: [1]
sqr1: [1]
activate1: [1]
ns1: multiset
0: multiset
terms1: [1]
add2: multiset
nadd2: multiset
cons: []
nfirst1: multiset
dbl1: [1]
s1: multiset
ADD2: multiset
first1: multiset
nil: multiset
recip1: multiset


The following usable rules [17] were oriented:

activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
sqr(0) → 0
terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
add(0, X) → X
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
dbl(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
terms(X) → n__terms(X)
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
first(0, X) → nil
add(s(X), Y) → s(n__add(activate(X), Y))
first(X1, X2) → n__first(X1, X2)
dbl(X) → n__dbl(X)
s(X) → n__s(X)
add(X1, X2) → n__add(X1, X2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ NonMonReductionPairProof
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ QDPOrderProof
QDP
                                                              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

SQR(s(n__s(x0))) → DBL(s(x0))
TERMS(N) → SQR(N)
SQR(s(n__dbl(x0))) → DBL(dbl(x0))
ACTIVATE(n__add(X1, X2)) → ADD(X1, X2)
ACTIVATE(n__terms(X)) → TERMS(X)
SQR(s(x0)) → DBL(x0)
SQR(s(n__add(x0, x1))) → DBL(add(x0, x1))

The TRS R consists of the following rules:

terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(n__add(sqr(activate(X)), dbl(activate(X))))
dbl(0) → 0
dbl(s(X)) → s(n__s(n__dbl(activate(X))))
add(0, X) → X
add(s(X), Y) → s(n__add(activate(X), Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(activate(X), activate(Z)))
terms(X) → n__terms(X)
add(X1, X2) → n__add(X1, X2)
s(X) → n__s(X)
dbl(X) → n__dbl(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__add(X1, X2)) → add(X1, X2)
activate(n__s(X)) → s(X)
activate(n__dbl(X)) → dbl(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 7 less nodes.